package com.game;


import android.graphics.Bitmap;

public class ButtonPlanet extends BasicButton 
{
	private Bitmap m_locked;
	public ButtonPlanet(int id, float x, float y,boolean startLocked, Bitmap onBitmap, Bitmap offBitmap, Bitmap lockBitmap)
	{
		super(id, x, y, onBitmap, offBitmap);
		m_locked = lockBitmap;
		
		if(startLocked) m_State = State.Disabled;
	}
	
	@Override
	protected Bitmap GetCurrentBitmap()
	{
		if(m_State == State.Selected) return m_on;
		else if (m_State == State.Unselected) return m_off;
		else return m_locked;
	}
	
	@Override
	protected  void SelectTouchedState()
	{
		switch (m_State) 
		{
		case Unselected:
			m_State = State.Selected;
			break;
		case Selected:
			m_State = State.Used;
			break;	
		default:
			break;
		}
	}
	
	
}
